<template>
  <ul>
    <li v-for="item in data" :key="item.id">
      <img   v-lazy="item.pic"  />
      <div class="title">
        <img src="@/assets/images/3.png" alt="" />
        <span class="name">{{ item.title | mysub(8) }}</span>
      </div>
      <div class="pic">
        <span>劵后</span>
        <span class="yuan">￥{{ item.yuanjia }}</span>
      </div>
      <div class="quan">
        <span class="one">劵</span>
        <span class="two">{{ item.quanJine }}元</span>
      </div>
      <div class="sell">已售{{ item.xiaoliang }}</div>
    </li>
  </ul>
</template>

<script>
import "@/assets/css/reset.css";
export default {
  props:{
    data:{
      type:Array,
      required:true,
    }
  },
};
</script>

<style lang="scss" scoped>
ul {
  display: flex;
  flex-wrap: wrap;
  align-content: space-around;
}
ul li {
  width: 160px;
  height: 280px;
  margin: 0 10px 10px 15px;
  background: #fff;
}
ul li img {
  width: 160px;
  height: 160px;
}
.title {
  width: 160px;
  height: 15px;
  line-height: 15px;
  margin-top: 15px;
  padding: 0 10px;
  margin-bottom: 15px;
}
.title img {
  width: 29px;
  height: 13px;
  margin-right: 5px;
}
.title .name {
  font-size: 13px;
  color: #333;
}
.pic {
  color: #666;
  font-size: 13px;
  padding: 0 10px;
  margin-bottom: 5px;
}
.pic .yuan {
  color: #ff2b22;
  font-size: 18px;
}
.quan {
  padding: 0 10px;
  margin-bottom: 5px;
}
.quan .one {
  display: inline-block;
  width: 13px;
  height: 13px;
  color: #fe3a33;
  background: #fff;
  border-radius: 1px 0 0 1px;
  border: 1px solid #fe3a33;
}
.quan .two {
  display: inline-block;
  width: 30px;
  height: 15px;
  background: linear-gradient(90deg, #ff8873 0, #ff4f4f 100%);
  border-radius: 2px;
  color: #fff;
}
.sell {
  padding: 0 10px;
  color: #666;
}
</style>